#include <stdio.h>

int main() {
	double res=0,cache;int i;
	for(i=0;(i%2==0?1:-1)*(cache=(i%2==0?1:-1)/(double)(2*(i+1)-1))>=1.0e-6;i++) res+=cache;
	printf("%.6lf",4*res);
	return 0;
}